// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 删除用户 删除用户接口 POST /api/user/delete */
export async function deleteUsingPost(body: API.DeleteRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseString_>('/api/user/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 根据用户id获取用户信息 根据用户id获取用户信息接口 GET /api/user/get */
export async function getUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseUserVo_>('/api/user/get', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 获取当前登录用户信息 获取当前登录用户信息接口 GET /api/user/getLoginUser */
export async function getLoginUserUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseUserVo_>('/api/user/getLoginUser', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 获取用户列表 获取用户列表接口 POST /api/user/list */
export async function listUsingPost(body: API.PageRequestDto, options?: { [key: string]: any }) {
  return request<API.BaseResponseIPageUserVo_>('/api/user/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 用户登录 用户登录接口 POST /api/user/login */
export async function loginUsingPost(body: API.UserRegisterDto, options?: { [key: string]: any }) {
  return request<API.BaseResponseUserVo_>('/api/user/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 退出登录 退出登录接口 GET /api/user/logout */
export async function logoutUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseString_>('/api/user/logout', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 用户注册 用户注册接口 POST /api/user/register */
export async function registerUsingPost(
  body: API.UserRegisterDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString_>('/api/user/register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 修改用户信息 修改用户信息接口 POST /api/user/update */
export async function updateUsingPost(body: API.UserUpdateDto, options?: { [key: string]: any }) {
  return request<API.BaseResponseString_>('/api/user/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
